' Create the document (Can only create the AcroExch.PDDoc object using
' late-binding)
Set AcroApp = CreateObject("AcroExch.App")
set pdfDoc = CreateObject("AcroExch.PDDoc")

' Open the document
ret = pdfDoc.Open("G:\web\baoguan\test\n.pdf")

pdfDoc.Save 1,"G:\web\baoguan\test\n1.pdf"

' Get the number of pages
pageCount = pdfDoc.GetNumPages()
msgbox pageCount